package day14;

import java.util.concurrent.Callable;

public class homework05 implements Callable<Integer> {
    private  int maxnum;
    private int minnum;
    private int sum;

    public homework05(int maxnum, int minnum) {
        this.maxnum = maxnum;
        this.minnum = minnum;
    }

    @Override
    public Integer call() {
        for (int i=minnum+1 ; i <= maxnum; i++) {
            System.out.print(i+" ");
            sum += i;
        }
        System.out.println();
        return sum;
    }
}
